package com.hxzy.service.impl;

import com.hxzy.entity.DictType;
import com.hxzy.mapper.DictTypeMapper;
import com.hxzy.service.DictTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 类说明
 *
 * @author admin
 * @date 2021-09-07
 */
@Transactional(rollbackFor = Exception.class)
@Service
public class DictTypeServiceImpl extends CommonServiceImpl<DictType,Long> implements DictTypeService {

    private DictTypeMapper dictTypeMapper;

    @Autowired
    public void setDictTypeMapper(DictTypeMapper dictTypeMapper) {
        this.dictTypeMapper = dictTypeMapper;
        super.setMyBatisBaseDao(dictTypeMapper);
    }

    @Override
    public List<DictType> selectCondition(DictType dictType) {
        return dictTypeMapper.selectCondition(dictType);
    }

    @Override
    public int existsName(Long dictId, String dictName) {
        return dictTypeMapper.existsName(dictId,dictName);
    }
}
